.class public Lrexsee/device/RexseeTelephony;
.super Ljava/lang/Object;
.source "RexseeTelephony.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final INTERFACE_NAME:Ljava/lang/String; = "Telephony"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 1
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 26
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 27
    iput-object p1, p0, Lrexsee/device/RexseeTelephony;->mBrowser:Lrexsee/core/browser/Browser;

    .line 28
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    .line 29
    return-void
.end method


# virtual methods
.method public getDataActivity()Ljava/lang/String;
    .locals 4

    .prologue
    const-string v3, "DATA_ACTIVITY_NONE"

    .line 33
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 34
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getDataActivity()I

    move-result v1

    packed-switch v1, :pswitch_data_0

    .line 46
    const-string v1, "DATA_ACTIVITY_NONE"

    move-object v1, v3

    :goto_0
    return-object v1

    .line 36
    :pswitch_0
    const-string v1, "DATA_ACTIVITY_IN"

    goto :goto_0

    .line 38
    :pswitch_1
    const-string v1, "DATA_ACTIVITY_OUT"

    goto :goto_0

    .line 40
    :pswitch_2
    const-string v1, "DATA_ACTIVITY_INOUT"

    goto :goto_0

    .line 42
    :pswitch_3
    const-string v1, "DATA_ACTIVITY_NONE"

    move-object v1, v3

    goto :goto_0

    .line 44
    :pswitch_4
    const-string v1, "DATA_ACTIVITY_DORMANT"

    goto :goto_0

    .line 34
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_3
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_4
    .end packed-switch
.end method

.method public getDataState()Ljava/lang/String;
    .locals 4

    .prologue
    const-string v3, "DATA_DISCONNECTED"

    .line 50
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 51
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getDataState()I

    move-result v1

    packed-switch v1, :pswitch_data_0

    .line 61
    const-string v1, "DATA_DISCONNECTED"

    move-object v1, v3

    :goto_0
    return-object v1

    .line 53
    :pswitch_0
    const-string v1, "DATA_DISCONNECTED"

    move-object v1, v3

    goto :goto_0

    .line 55
    :pswitch_1
    const-string v1, "DATA_CONNECTING"

    goto :goto_0

    .line 57
    :pswitch_2
    const-string v1, "DATA_CONNECTED"

    goto :goto_0

    .line 59
    :pswitch_3
    const-string v1, "DATA_SUSPENDED"

    goto :goto_0

    .line 51
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method

.method public getDeviceId()Ljava/lang/String;
    .locals 3

    .prologue
    .line 65
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 66
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getDeviceId()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getDeviceSoftwareVersion()Ljava/lang/String;
    .locals 3

    .prologue
    .line 69
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 70
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getDeviceSoftwareVersion()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 17
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 13
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Telephony"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getLine1Number()Ljava/lang/String;
    .locals 3

    .prologue
    .line 73
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 74
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getLine1Number()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getNetworkCountryIso()Ljava/lang/String;
    .locals 3

    .prologue
    .line 77
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 78
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkCountryIso()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getNetworkOperator()Ljava/lang/String;
    .locals 3

    .prologue
    .line 81
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 82
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperator()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getNetworkOperatorName()Ljava/lang/String;
    .locals 3

    .prologue
    .line 85
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 86
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperatorName()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getNetworkType()Ljava/lang/String;
    .locals 4

    .prologue
    const-string v3, "NETWORK_TYPE_UNKNOWN"

    .line 89
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 90
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkType()I

    move-result v1

    packed-switch v1, :pswitch_data_0

    .line 114
    const-string v1, "NETWORK_TYPE_UNKNOWN"

    move-object v1, v3

    :goto_0
    return-object v1

    .line 92
    :pswitch_0
    const-string v1, "NETWORK_TYPE_UNKNOWN"

    move-object v1, v3

    goto :goto_0

    .line 94
    :pswitch_1
    const-string v1, "NETWORK_TYPE_GPRS"

    goto :goto_0

    .line 96
    :pswitch_2
    const-string v1, "NETWORK_TYPE_EDGE"

    goto :goto_0

    .line 98
    :pswitch_3
    const-string v1, "NETWORK_TYPE_UMTS"

    goto :goto_0

    .line 100
    :pswitch_4
    const-string v1, "NETWORK_TYPE_CDMA"

    goto :goto_0

    .line 102
    :pswitch_5
    const-string v1, "NETWORK_TYPE_EVDO_0"

    goto :goto_0

    .line 104
    :pswitch_6
    const-string v1, "NETWORK_TYPE_EVDO_A"

    goto :goto_0

    .line 106
    :pswitch_7
    const-string v1, "NETWORK_TYPE_1xRTT"

    goto :goto_0

    .line 108
    :pswitch_8
    const-string v1, "NETWORK_TYPE_HSDPA"

    goto :goto_0

    .line 110
    :pswitch_9
    const-string v1, "NETWORK_TYPE_HSUPA"

    goto :goto_0

    .line 112
    :pswitch_a
    const-string v1, "NETWORK_TYPE_HSPA"

    goto :goto_0

    .line 90
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
        :pswitch_8
        :pswitch_9
        :pswitch_a
    .end packed-switch
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 21
    new-instance v0, Lrexsee/device/RexseeTelephony;

    invoke-direct {v0, p1}, Lrexsee/device/RexseeTelephony;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getPhoneType()Ljava/lang/String;
    .locals 4

    .prologue
    const-string v3, "PHONE_TYPE_NONE"

    .line 118
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 119
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getPhoneType()I

    move-result v1

    packed-switch v1, :pswitch_data_0

    .line 127
    const-string v1, "PHONE_TYPE_NONE"

    move-object v1, v3

    :goto_0
    return-object v1

    .line 121
    :pswitch_0
    const-string v1, "PHONE_TYPE_NONE"

    move-object v1, v3

    goto :goto_0

    .line 123
    :pswitch_1
    const-string v1, "PHONE_TYPE_GSM"

    goto :goto_0

    .line 125
    :pswitch_2
    const-string v1, "PHONE_TYPE_CDMA"

    goto :goto_0

    .line 119
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public getSimCountryIso()Ljava/lang/String;
    .locals 3

    .prologue
    .line 132
    invoke-virtual {p0}, Lrexsee/device/RexseeTelephony;->isSimReady()Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, ""

    .line 134
    :goto_0
    return-object v1

    .line 133
    :cond_0
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 134
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimCountryIso()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public getSimOperator()Ljava/lang/String;
    .locals 3

    .prologue
    .line 137
    invoke-virtual {p0}, Lrexsee/device/RexseeTelephony;->isSimReady()Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, ""

    .line 139
    :goto_0
    return-object v1

    .line 138
    :cond_0
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 139
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperator()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public getSimOperatorName()Ljava/lang/String;
    .locals 3

    .prologue
    .line 142
    invoke-virtual {p0}, Lrexsee/device/RexseeTelephony;->isSimReady()Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, ""

    .line 144
    :goto_0
    return-object v1

    .line 143
    :cond_0
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 144
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperatorName()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public getSimSerialNumber()Ljava/lang/String;
    .locals 3

    .prologue
    .line 147
    invoke-virtual {p0}, Lrexsee/device/RexseeTelephony;->isSimReady()Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, ""

    .line 149
    :goto_0
    return-object v1

    .line 148
    :cond_0
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 149
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimSerialNumber()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public getSimState()Ljava/lang/String;
    .locals 4

    .prologue
    const-string v3, "SIM_STATE_UNKNOWN"

    .line 152
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 153
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimState()I

    move-result v1

    packed-switch v1, :pswitch_data_0

    .line 167
    const-string v1, "SIM_STATE_UNKNOWN"

    move-object v1, v3

    :goto_0
    return-object v1

    .line 155
    :pswitch_0
    const-string v1, "SIM_STATE_ABSENT"

    goto :goto_0

    .line 157
    :pswitch_1
    const-string v1, "SIM_STATE_UNKNOWN"

    move-object v1, v3

    goto :goto_0

    .line 159
    :pswitch_2
    const-string v1, "SIM_STATE_NETWORK_LOCKED"

    goto :goto_0

    .line 161
    :pswitch_3
    const-string v1, "SIM_STATE_PIN_REQUIRED"

    goto :goto_0

    .line 163
    :pswitch_4
    const-string v1, "SIM_STATE_PUK_REQUIRED"

    goto :goto_0

    .line 165
    :pswitch_5
    const-string v1, "SIM_STATE_READY"

    goto :goto_0

    .line 153
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
        :pswitch_3
        :pswitch_4
        :pswitch_2
        :pswitch_5
    .end packed-switch
.end method

.method public getSubscriberId()Ljava/lang/String;
    .locals 3

    .prologue
    .line 171
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 172
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSubscriberId()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getVoiceMailAlphaTag()Ljava/lang/String;
    .locals 3

    .prologue
    .line 175
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 176
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getVoiceMailAlphaTag()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public getVoiceMailNumber()Ljava/lang/String;
    .locals 3

    .prologue
    .line 179
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 180
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getVoiceMailNumber()Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public isNetworkRoaming()Z
    .locals 3

    .prologue
    .line 183
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 184
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->isNetworkRoaming()Z

    move-result v1

    return v1
.end method

.method public isSimReady()Z
    .locals 3

    .prologue
    .line 187
    iget-object v1, p0, Lrexsee/device/RexseeTelephony;->mContext:Landroid/content/Context;

    const-string v2, "phone"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 188
    .local v0, "tm":Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimState()I

    move-result v1

    const/4 v2, 0x5

    if-ne v1, v2, :cond_0

    const/4 v1, 0x1

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method
